{% extends "management/managementbase.html" %}

{% comment %}
#    Copyright 2012 New Mexico EPSCoR
#
#    This file is part of Teacher's P.E.T.
#
#    Teacher's P.E.T. is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    Teacher's P.E.T. is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with Teacher's P.E.T..  If not, see <http://www.gnu.org/licenses/>.
{% endcomment %}

{% block subtitle %} | {{AppTitle}} Management{% endblock subtitle %}

{% block css %}
    {{block.super}}
    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/management_container.css" >
{% endblock css %}

{% block topbar %}{% if not iframe %}{{block.super}}{% endif %}{% endblock topbar %}
{% block topmenu %}{% if not iframe %}{{block.super}}{% endif %}{% endblock topmenu %}

{% block content %}
<div class="management_container">
    {% if not iframe %}
    <div class="management_tabs">
        <table border="0" cellpadding="0" cellspacing="0">
            <tr>
            {% for app in Apps %}
                {% if AppTitle == app %}
                    {% if command != 'manage' %}
                    <th class="selected active">
                        <a href="{% course_url management app=app|slugify %}">{{app}}</a>
                    </th>
                    {% else %}
                    <th class="selected"><a>{{app}}</a></th>
                    {% endif %}
                {% else %}
                    <th class="active">
                    <a href="{% course_url management app=app|slugify %}">{{app}}</a>
                    </th>
                {% endif %}
            {% endfor %}
            {% if request.user.is_staff %}
                <th class="active"><a href="{% url admin:index %}">Admin</a></th>
            {% endif %}
            </tr>
        </table>
    </div>
    {% endif %}
    <div class="management_content">
        {% if not iframe %}
        {% if command != 'manage' %}
            <span class="floatleft">
                <a href="{% course_url management app=AppTitle|slugify %}">{{AppTitle|safe}}</a>
                 > {{command|safe|capfirst}}</span>
        {% endif %}
        {% endif %}
        {{content}}
    </div>
</div>
{% endblock content %}